package com.tszs.biz;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tszs.dao.mapper.MessageManagementMapper;
import com.tszs.entity.MessageManagement;
import com.tszs.entity.MessageManagementExample;

/**
 * @类名:MessageManagementBiz 
 * @类描述:留言管理 
 * @创建时间: 2019-03-21 11:49:11
 * @author 王俊
 *
 */
@Service
public class MessageManagementBiz {
	@Autowired
	private MessageManagementMapper messageManagementMapper;

	/**
	 * @方法名: insertSelective
	 * @方法描述: 留言添加
	 * @创建时间: 2019-03-21 11:49:11
	 * @author: 王俊
	 * @return: 0失败 1成功
	 */
	@Transactional
	public int insertSelective(MessageManagement record) {
		return messageManagementMapper.insertSelective(record);
	}
	/**
	 * @方法名: selectByExamplePage
	 * @方法描述: 留言分页
	 * @创建时间: 2019-03-21 11:49:11
	 * @author: 王俊
	 * @return: 0失败 1成功
	 */
	@Transactional
	public List<MessageManagement> selectByExamplePage(MessageManagement example){
		return messageManagementMapper.selectByExamplePage(example);
	}
	/**
	 * @方法名: selectByExamplePage
	 * @方法描述: 留言修改
	 * @创建时间: 2019-03-21 11:49:11
	 * @author: 王俊
	 * @return: 0失败 1成功
	 */
	@Transactional
	public int updateByExampleSelective(@Param("record") MessageManagement record,
			@Param("example") MessageManagementExample example){
		return messageManagementMapper.updateByExampleSelective(record, example);
	}
	/**
	 * @方法名: findmessage
	 * @方法描述: 查询留言
	 * @创建时间: 2019-03-21 11:49:11
	 * @author: 王俊
	 * @return: 0失败 1成功
	 */
	@Transactional
	public List<MessageManagement> findmessage(MessageManagement example){
		return messageManagementMapper.findmessage(example);
	}
	/**
	 * @方法名: selectByExample
	 * @方法描述: 留言查询
	 * @创建时间: 2019-03-21 11:49:11
	 * @author: 王俊
	 * @return: 0失败 1成功
	 */
	@Transactional
	public List<MessageManagement> selectByExample(MessageManagementExample example){
		return messageManagementMapper.selectByExample(example);
	}
}
